<template>
  <div>
    <el-card>
      <div class="top">
        <div class="left">
          <el-image class="img" :src="userStore.avatar"></el-image>
        </div>
        <div class="right">
          <div>{{ getDayRegions() }}</div>
          <div class="title">{{ userStore.username }}</div>
          <span class="content">welcome to home</span>
        </div>
      </div>
    </el-card>
    <div class="svgIcon">
      <svg-icon name="welcome" width="100%" height="800px"></svg-icon>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { getDayRegions } from '@/utils/time'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
</script>

<style lang="scss" scoped>
.top {
  display: flex;
  align-items: center;
  .left {
    .img {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      margin-right: 20px;
    }
  }
  .right {
    .title {
      color: aqua;
      font-size: 30px;
      margin: 10px 0;
    }
    .content {
      color: darkgray;
      font-size: 16px;
    }
  }
}
.svgIcon {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
